/**
 * 抖音关注：程序员三丙
 * 知识星球：https://t.zsxq.com/j9b21
 */
package sanbing.example.dylike.adapter.websocket;

import lombok.RequiredArgsConstructor;

import java.nio.ByteBuffer;

@RequiredArgsConstructor
public class SanbingWebSocketPingMsg implements SanbingWebSocketMsg<ByteBuffer> {

    public static SanbingWebSocketPingMsg INSTANCE = new SanbingWebSocketPingMsg();

    private static final ByteBuffer PING_MSG = ByteBuffer.wrap(new byte[]{});

    @Override
    public SanbingWebSocketMsgType getType() {
        return SanbingWebSocketMsgType.PING;
    }

    @Override
    public ByteBuffer getMsg() {
        return PING_MSG;
    }
}
